package com.zhijiaoyun.service;

import java.util.List;

import com.zhijiaoyun.model.BuyHistory;
import com.zhijiaoyun.model.dto.BuyHistoryDto;
import com.zhijiaoyun.model.dto.PageList;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface IBuyHistoryService {

	/**
	 * add
	 * @param buyHistory
	 */
	void addBuyService(BuyHistory buyHistory);

	/**
	 * get by userId goodsId
	 * @param userId
	 * @param courseId
	 * @param goodsType
	 * @return
	 */
	BuyHistory getBuyHistoryByUserIdGoodsId(Long userId, Long courseId, int goodsType);

	/**
	 * page
	 * @param pageIndex
	 * @param pageSize
	 * @param userId
	 * @return
	 */
	PageList<BuyHistoryDto> getBuyHistoryDtoByUserId(Integer pageIndex, Integer pageSize, Long userId);

	/**
	 * list by goodsId
	 * @param pageIndex
	 * @param pageSize
	 * @param goodsId
	 * @param goodsType
	 * @return
	 */
	List<BuyHistory> getBuyHistoryByGoodsId(int pageIndex, int pageSize, Long goodsId, int goodsType);

}
